<div class="order-list">
  <div class="order-content">
    <div class="order-title order-row">
      <span class="product">商品</span>
      <span class="receiver">收货人</span>
      <span class="total">订单金额</span>
      <span class="time">时间</span>
      <span class="status">状态</span>
      <span class="operation">操作</span>
    </div>

    <div class="order-single" ng-repeat="order in orderList">
      <div class="order-num order-row">
        订单号：{{order.orderNum}}
      </div>
      <div class="order-item order-row" ng-switch on="orderListType">
        <span class="product">
          <a href="product#/{{}}" ng-repeat="product in order.productList">
            <img ng-src={{product.image}} alt="product image"/>
          </a>
        </span>
        <span class="receiver">{{order.receiver}}</span>
        <span class="total">￥{{order.total}}</span>
        <span class="time">{{order.created_at}}</span>


        <span class="status" ng-switch-when="user" ng-switch on="order.status">
            <span ng-switch-when="1">已提交</span>
            <span ng-switch-when="2">已发货</span>
            <span ng-switch-when="3">已收货</span>
        </span>
        <span class="status" ng-switch-when="administrator">
            <select ng-model="order.status" ng-change="changeStatus(order.id, order.status)">
              <option value="1" ng-disabled="true">已提交</option>
              <option value="2" ng-disabled="order.status != 1">已发货</option>
              <option value="3" ng-disabled="order.status != 2">已收货</option>
            </select>
        </span>

        <span class="operation" ng-switch on="orderListType">
          <span ng-switch-when="user">
            <a href="order#/info/{{order.id}}">查看</a><span ng-show="order.status != 2">|<span ng-click="delete(order.id)">删除</span></span>
          </span>
          <span ng-switch-when="administrator">
            <a href="administrator#/orderInfo/{{order.id}}">查看</a><span ng-show="order.status == 3">|<span ng-click="delete(order.id)">删除</span></span>
          </span>
          
        </span>

      </div>

    </div>

    <!--
    <div class="order-single">
      <div class="order-num order-row">
        订单号：4343043048
      </div>
      <div class="order-item order-row">
      <span class="product">
        <a href="#"><img src="image/cifang.jpeg" alt="此方"/></a>
        <a href="#"><img src="image/cifang.jpeg" alt="此方"/></a>
      </span>
        <span class="receiver">Rocky</span>
        <span class="total">￥2333</span>
        <span class="time">2015-01-01 00:00:00</span>
        <span class="status">
          <select>
            <option value="1" ng-disabled="true">已提交</option>
            <option value="2">已发货</option>
            <option value="3">已收货</option>
          </select>
        </span>
        <span class="operation">
          <span>查看</span>|<span>删除</span>
        </span>
      </div>
    </div>


    <div class="order-single">
      <div class="order-num order-row">
        订单号：4343043048
      </div>
      <div class="order-item order-row">
      <span class="product">
        <a href="#"><img src="image/cifang.jpeg" alt="此方"/></a>
        <a href="#"><img src="image/cifang.jpeg" alt="此方"/></a>
      </span>
        <span class="receiver">Rocky</span>
        <span class="total">￥2333</span>
        <span class="time">2015-01-01 00:00:00</span>
        <span class="status">已提交</span>
        <span class="operation">
          <span>查看</span>|<span>删除</span>
        </span>
      </div>
    </div>
    -->
  </div>
</div>
